package com.demo.studentmanager.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.demo.studentmanager.dao.StudentMapper;
import com.demo.studentmanager.dto.StudentListDto;
import com.demo.studentmanager.entity.Student;
import com.demo.studentmanager.service.IStudentService;
import com.demo.studentmanager.vo.StudentVO;
import org.springframework.stereotype.Service;


/**
 * @author LinQiSen
 */
@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements IStudentService {

    @Override
    public IPage<StudentVO> getStudentList(StudentListDto studentListDto) {
        IPage<StudentVO> page = new Page<>(studentListDto.getCurrent(), studentListDto.getSize());
        return baseMapper.getStudentList(page, studentListDto);
    }
}
